$(document).ready(function () {
    console.log("页面初始化加载模拟数据")
    const reportModuleData = [
        { reportId: "OPSRR022002", num: "4", reportName: "受托资金投资收益表", ip: "赢时胜-北京分公司", rule: '中基协[2019]120号', date: '20190701-20191231' },
        { reportId: "OPSRR012001", num: "3", reportName: "份额持有人报送日报表", ip: "赢时胜-北京分公司", rule: '中基协[2019]120号', date: '20190701-20191231' },
        { reportId: "B3027", num: "2", reportName: "风险准备金资产构成情况_月报", ip: "赢时胜-北京分公司", rule: '中基协[2019]120号', date: '20190701-20191231' },
        { reportId: "AY01", num: "1", reportName: "风险准备金明细表", ip: "赢时胜-北京分公司", rule: '中基协[2019]120号', date: '20190701-20191231' }
       
        
    ]
    window.localStorage.setItem("reportModuleData", JSON.stringify(reportModuleData));
    console.log("存储的报表模板数据:" + window.localStorage.getItem("reportModuleData"));
    const reportData = {
        "OPSRR022002": [
            { id: "stzjtz001", rname: "建行22", rtype: "银监会", rcode: "stzjtz001562", rTname: '中美大都会', rTtype: '委托', rvalue: 50000 },
            { id: "stzjtz002", rname: "建行", rtype: "银监会", rcode: "stzjtz001562", rTname: '监管证券', rTtype: '委托', rvalue: 50000 },
            { id: "stzjtz003", rname: "建行", rtype: "银监会", rcode: "stzjtz001562", rTname: '数据集', rTtype: '委托', rvalue: 50000 },
        ],
        "OPSRR012001": [
            { id: "fecybsj001", rname: "农行", rtype: "监管机构", rcode: "fecybs001562", rTname: '中美大都会', rTtype: '委托', rvalue: 40000 },
            { id: "fecybsj002", rname: "交行", rtype: "监管机构", rcode: "fecybs001562", rTname: '监管证券', rTtype: '委托', rvalue: 40000 },
            { id: "fecybsj003", rname: "交行", rtype: "监管机构", rcode: "fecybs001562", rTname: '数据集', rTtype: '委托', rvalue: 40000 },
        ],
      
        "B3027": [
            { id: "fxzbj001", rname: "交行", rtype: "银监会", rcode: "fxzbj001562", rTname: '中美大都会', rTtype: '委托', rvalue: 30000 },
            { id: "fxzbj002", rname: "交行", rtype: "银监会", rcode: "fxzbj001562", rTname: '监管证券', rTtype: '委托', rvalue: 30000 },
            { id: "fxzbj003", rname: "交行", rtype: "银监会", rcode: "fxzbj001562", rTname: '数据集', rTtype: '委托', rvalue: 30000 },
        ],
        "AY01": [
            { id: "fxjmx001", rname: "招行", rtype: "银监会", rcode: "kxz001562", rTname: '中美大都会', rTtype: '委托', rvalue: 10000 },
            { id: "fxjmx002", rname: "招行", rtype: "银监会", rcode: "kxz001565", rTname: '期权交易所', rTtype: '委托', rvalue: 10000 },
            { id: "fxjmx003", rname: "招行", rtype: "银监会", rcode: "kxz001567", rTname: '股票', rTtype: '委托', rvalue: 20000 },
            { id: "fxjmx004", rname: "招行", rtype: "银监会", rcode: "kxz001569", rTname: '监管', rTtype: '委托', rvalue: 10000 },
        ]
       

    };
    window.localStorage.setItem("reportData", JSON.stringify(reportData));
    console.log("存储的报表数据:" + window.localStorage.getItem("reportData"));

    const columnData =[
        { data: 'id', type: 'text',name: 'ID'},
        { data: 'rtype', type: 'text',name: '管理人类型' },
        { data: 'rcode', type: 'text',  name: '产品编码' },
        { data: 'rTname', type: 'text', name: '产品名称' },
        { data: 'rTtype', type: 'text', name: '管理类型' },
        { data: 'rvalue', type: 'text', name: '期末资产净值' },
    ];

    window.localStorage.setItem("columnData", JSON.stringify(columnData));
    console.log("存储的columnData:" + window.localStorage.getItem("columnData"));


    const errorMessage = {
        "AY01":[
            {errorPos:"table",table:"表信息错误"}
        ],
        "B3027":[
            {errorPos:"rcode",col:"列信息错误"}
        ],
        "OPSRR012001":[
            {errorPos:"fecybsj001",row:"行信息错误"}
        ],
        "OPSRR022002":[
            {errorPos:"stzjtz001",rTname:"含有非法字母"}
        ]
    };

    window.localStorage.setItem("errorMessage", JSON.stringify(errorMessage));
    console.log("存储的errorMessage:" + window.localStorage.getItem("errorMessage"));

    //  const errorMessage = {
    //      "stzjtz001":{"rTname":"含有非法字母"},
    //      "fecybsj001":{"row":"行信息错误"},
    //      "B3027":{"col":"列信息错误","colNum":"2"},
    //      "AY01":{"table":"表信息错误"}
    //  };

   

})